package com.snail.app.gather.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @description
 * @date 2021/12/16
 * @autor houyanfeng
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Entity
@Table(name = "send_fail_data")
public class SendFailData implements Serializable {
    @Id
    @Column(length = 36)
    private String id;
    private Integer replyCode;//回应码
    @Column(length = 30)
    private String replyText;//回应消息
    @Column(length = 30)
    private String exchange;//交换机
    @Column(length = 30)
    private String routingKey;//路由键
    @Lob
    @Column(columnDefinition = "Text")
    private String data;
    private Date syncTime;//上次发生事件
    private Integer sendNum;//发送次数
    private Date createTime;//创建时间

    public SendFailData(String id, Integer replyCode, String replyText, String exchange, String routingKey, String data, Date createTime) {
        this.id = id;
        this.replyCode = replyCode;
        this.replyText = replyText;
        this.exchange = exchange;
        this.routingKey = routingKey;
        this.data = data;
        this.createTime = createTime;
    }


}
